package com.zzsy.carosshopprojects.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.king.base.adapter.ViewHolderAdapter;
import com.king.base.adapter.holder.ViewHolder;
import com.yatoooon.screenadaptation.ScreenAdapterTools;
import com.zzsy.carosshopprojects.R;
import com.zzsy.carosshopprojects.bean.PayKindBean;

import java.util.List;

public class PayKindAdapter extends ViewHolderAdapter<PayKindBean> {
     public static final String WX="wx";
     public static final String ZFB="zfb";
     public static final String YL="yl";
    public PayKindAdapter(Context context, List<PayKindBean> listData, int layoutId) {
        super(context, listData, layoutId);
    }

    @Override
    public View buildConvertView(LayoutInflater layoutInflater, PayKindBean item, int position, ViewGroup parent) {
        View view = layoutInflater.inflate(R.layout.adapter_paykind, null);
        ScreenAdapterTools.getInstance().loadView(view);
        return view;
    }

    @Override
    public void bindViewDatas(ViewHolder helper, PayKindBean bean, int positions) {
        helper.setImageResource(R.id.iv_pic, bean.getPic());
        helper.setText(R.id.tv_title, bean.getTitle());
    }
}
